import cv2
import time
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
time.sleep(3)
ret,img = cap.read()
cv2.imwrite("test.jpg",img)
print("finish")